home *** CD-ROM | disk | FTP | other *** search
- Path: news.mindlink.net!news
- From: Allan_Nienhuis@mindlink.bc.ca (Allan Nienhuis)
- Newsgroups: comp.lang.c++
- Subject: Re: how many characters have been read from ifstream?
- Date: Mon, 08 Apr 1996 14:39:43 GMT
- Organization: MIND LINK! - British Columbia, Canada
- Message-ID: <4kb89k$2to@fountain.mindlink.net>
- References: <DpCyDr.5yK@cdf.toronto.edu>
- NNTP-Posting-Host: line013.abb.mindlink.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- a209dowm@cdf.toronto.edu (P A U L) wrote:
-
- >is there any way to check how many characters have been read from an ifstream?
-
- >The reason I want to know is because my program is processing a file, and about
- >halfway through the file in_stream.eof() returns 1 (the ifstream object is named
- >in_stream). I'm certain that it's only halfway through the file, because I've
- >stepped through the program line-by-line.
-
- >thanks,
- >Paul.
-
- try opening the file in binary mode. you could be reading and eof
- character partway thru the file.
-
-
-
-